const deepSet = (source, target) => {
    if (!Object.keys(target).length) {
        return source
    }

    for (const key in target) {
        if (target[key] instanceof Array) {
            source[key] = target[key]
            continue
        }
        if (target[key] instanceof Object) {
            deepSet(source[key], target[key])
            continue
        }
        source[key] = target[key]
    }
    return source
}

export default deepSet